//
//  SRViewController.m
//  icamping
//
//  Created by Soraia Ferreira on 15/06/14.
//  Copyright (c) 2014 ___FULLUSERNAME___. All rights reserved.
//

#import "SRViewController.h"


@implementation SRViewController

@synthesize campingGround;
@synthesize campingNameTxt, campingDescTxt;

- (void)viewWillAppear:(BOOL)animated{
    
    [super viewWillAppear:YES];
    
    if(campingGround) {
        self.campingNameTxt.text =campingGround.name;
        self.campingDescTxt.text = campingGround.description;
    }
    
    }

- (void)viewDidLoad {
    [super viewDidLoad];
}








//TabBar
-(void)tabBar:(UITabBar*)theTabBar didSelectItem:(UIViewController*)viewController{
    NSLog(@"Tab index = %@ ", theTabBar.selectedItem);
    
    for(int i =0; i < theTabBar.items.count; i++) {
        if(theTabBar.selectedItem == theTabBar.items[i]) {
            NSLog(@"TabBarItem Index: %d",i);
        }
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
